home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 2
/
Amiga Tools 2.iso
/
tex
/
macros
/
source
/
contrib
/
supported
/
xypic
/
ps
/
xy212dict.ps
Wrap
Text File
|
1995-03-15
|
8KB
|
228 lines
%!PS-Adobe-3.0 Resource-procset
%%Title: xy212dict.ps
%%Version: 2.12
%%Creator: XY-ps backend to XY-pic
%%DocumentSuppliedProcSets: XYdict
%%For: use with XY-pic
%%BeginResource: procset XYdict
/XYdict where not{200 dict /XYdict exch def
/xy{XYdict begin countdictstack /xylevel exch def
xyopen xycolor stopped xyclose cleartomark end}def
/xyc{{xysetcol}xy}def /xycc{{xychgcol}xy}def XYdict}if
begin
/xyopen{currentdict /XYddict known{XYddict null eq{}{XYddict begin xyopen}ifelse}if}def
/xyclose{countdictstack -1 xylevel 1 add{pop end}for}def
/xycolor{0 setgray}bind def
end
XYdict begin
/xyopen{currentdict /XYddict known{XYddict null eq{}{XYddict begin xyopen}ifelse}if}def
/xycolor{0 setgray}bind def
/xyclose{countdictstack -1 xylevel 1 add{pop end}for}def
/xypush{8 dict /XYddict exch def XYddict begin}def
/undef where
{pop /xypop{countdictstack xylevel eq{}{end}ifelse
currentdict /XYddict undef}def}{/xypop{countdictstack xylevel eq{}{end}ifelse
/XYddict null def}def}ifelse
/xychgcol{/xycolor exch def}def
/xysetcol{xypush xychgcol}def
/xysize 10 def
/xypspt{72 72.27 div dup scale}bind def
/dimendiv{65536 div}bind def
/xysegl 327680 dimendiv def
/xyopp{1 -1 scale}bind def
/pscorrect{.85 mul}bind def
/xy{countdictstack /xylevel exch def xyopen xycolor stopped
xyclose cleartomark}def
/xywidth{26213 dimendiv pscorrect setlinewidth}bind def
/xydash{[] 0 setdash}bind def
/xycap{1 setlinecap}bind def
/xyjoin{1 setlinejoin}bind def
/xycolor{0 setgray}bind def
/xyfont{4096 add 64 div round 64 mul 4096 sub}def
/xysdfont{4096 add 32 div round 32 mul 4096 sub}def
/xydots{xywidth 1 setlinecap [0 2] 0 setdash}bind def
/setupDirection{dup -2048 lt{3072 add neg 1024 exch}
{dup 0 lt{1024 add neg -1024}{dup 2048 lt{1024 sub -1024 exch}
{3072 sub 1024}ifelse}ifelse}ifelse atan
dup 180 gt{360 sub}if dup /XYdirection exch def rotate}def
/xyCheckDir{dup 8 div 3 mul 3 -1 roll sub neg exch div 360 mul
dup dup XYdirection sub 180 div round 180 mul XYdirection add
dup 3 -1 roll sub abs 10 gt not{exch}if pop}def
/xyrulth{26213 dimendiv pscorrect setlinewidth
0 setlinecap}bind def
/gsavexy{gsave xypspt XYdirection rotate xywidth newpath 0 0 moveto}def
/gchksavexy{gsave xypspt setupDirection xywidth newpath 0 0 moveto}def
/gstartxy{gsave xypspt xywidth xycap xyjoin newpath 0 0 moveto}def
/grulexy{gsave xyrulth newpath 0 0 moveto}def
/xystroke{stroke grestore}bind def
/arc4pop{arcto 4{pop}repeat}bind def
/xyswap{XYdirection 180 add /XYdirection exch def}def
/xyline{gstartxy setupDirection rlineto xystroke}def
/dash{exch gchksavexy xysegl XYdirection dup
-90 lt{pop neg}{90 gt{neg}if}ifelse exch{neg}if
0 rlineto xystroke}def
/stopper{gstartxy setupDirection 0 xysegl 2 div rmoveto
0 xysegl neg rlineto xystroke }def
/solid{gstartxy xydash xycap neg exch neg exch rlineto xystroke}def
/dashed{gstartxy 2 copy dup mul exch dup mul add sqrt dup
xysegl add xysegl 2 mul div round 2 mul 1 sub div [ exch dup ] 0 setdash
xycap neg exch neg exch rlineto xystroke}def
/dot{gstartxy 2 setlinecap [0 2] 0 setdash
1 0 rlineto xystroke}def
/dotted{gstartxy 2 copy dup mul exch dup mul add sqrt dup
2 div round 1 add div 2 setlinecap [0 3 -1 roll] 0 setdash
neg exch neg exch rlineto 0 0 rlineto xystroke}def
/cubic{gstartxy xycap docubic} def
/docubic{chkvalid
{chkcubedge 8 -2 roll moveto curveto xystroke pop}
{cleartomark grestore}ifelse}def
/chkcubedge{2 copy 1.0 eq{0.0 eq{pop pop}{cubicedge}ifelse}
{pop cubicedge}ifelse}def
/dotcubic{gstartxy 1 setlinecap [0 2] 0 setdash docubic}def
/dashcubic{gstartxy xycap [5 5] 0 setdash docubic}def
/squine{gstartxy xycap dosquine}def
/dosquine{chkvalid
{chksquedge 2 copy moveto xysq2cub curveto xystroke pop}
{cleartomark grestore}ifelse}def
/chkvalid{2 copy lt{dup 1 gt{false}{true}ifelse}{false}ifelse}def
/chksquedge{2 copy 1.0 eq{0.0 eq{pop pop}{squineedge}ifelse}
{pop squineedge}ifelse}def
/xysq2cub{xysq2cubit 6 1 roll xysq2cubit 6 1 roll 3 index 3 index
xysq2cubit 6 1 roll xysq2cubit 6 1 roll pop pop}def
/xysq2cubit{2 index 2 mul add 3 div}def
/dotsquine{gstartxy 1 setlinecap [0 2] 0 setdash dosquine}def
/dashsquine{gstartxy xycap [5 5] 0 setdash dosquine}def
/xy4mul{8 copy
5 -1 roll mul 5 1 roll 6 -1 roll mul 6 1 roll
3 -1 roll mul exch 4 -1 roll mul 3 1 roll
add 3 1 roll add exch 10 2 roll
7 -1 roll mul 7 1 roll 4 -1 roll mul 5 1 roll
4 -1 roll mul 4 1 roll mul add 3 1 roll add
exch 3 -1 roll }def
/xy44mul{
4 copy 16 4 roll exch 3 1 roll 4 copy 12 4 roll
xy4mul 12 4 roll xy4mul 12 -4 roll 4 copy 16 4 roll
8 4 roll xy4mul 12 4 roll xy4mul}def
/cubicedge{10 2 roll
exch 8 1 roll 3 -1 roll dup dup 9 2 roll
5 -1 roll dup dup 9 1 roll 8 3 roll
4 1 roll dup dup 5 3 roll dup dup 5 1 roll 3 -1 roll
18 -2 roll 2 copy 1 sub neg 4 1 roll 1 sub neg exch 4 1 roll
xy444mul
pop pop pop 13 1 roll pop pop pop 9 1 roll
10 1 roll pop 8 1 roll 7 1 roll 8 1 roll pop 5 1 roll 3 1 roll
}def
/xy444mul{
4 copy 24 4 roll 12 -4 roll 16 4 roll 4 copy 16 4 roll
xy44mul 20 8 roll xy44mul
12 -4 roll
4 -1 roll 7 1 roll exch 4 1 roll exch 6 -1 roll exch 4 2 roll
16 8 roll 8 4 roll
4 -1 roll 7 1 roll exch 4 1 roll exch 6 -1 roll exch 4 2 roll
8 4 roll 16 4 roll 8 4 roll 20 -4 roll exch 3 1 roll
4 copy 20 4 roll 4 copy 16 4 roll 4 copy 12 4 roll
xy4mul 28 4 roll xy4mul 20 4 roll xy4mul 12 4 roll xy4mul}def
/squineedge{8 2 roll
exch 5 1 roll 3 -1 roll dup 6 2 roll 1 index exch
10 -2 roll 2 copy 1 sub neg 4 1 roll 1 sub neg exch 4 1 roll
xy44mul 4 1 roll pop 5 1 roll 6 1 roll 3 -1 roll pop}def
/xyshort{2 copy abs exch abs add xysegl .5 mul lt
{pop pop grestore}{rlineto xystroke}ifelse}def
/tipwidth{xywidth xycap}def
/halftip{tipwidth xysize 10 div 0 0 moveto
-.25 0 3 -1 roll -2.5 mul 0 xysize 2 div neg
dup .62 mul 2 div neg curveto}bind def
/atip{gchksavexy halftip xystroke}def
/btip{gchksavexy xyopp halftip xystroke}def
/tip{gchksavexy gsave halftip stroke grestore
xyopp halftip xystroke}def
/halfcmtip{tipwidth 0 0 moveto
-.1333 xysize mul 0 .2 xysize mul neg dup .125 xysize mul
3 -1 roll .25 xysize mul curveto}bind def
/cmatip{gchksavexy halfcmtip xystroke}def
/cmbtip{gchksavexy xyopp halfcmtip xystroke}def
/cmtip{gchksavexy gsave halfcmtip stroke grestore
xyopp halfcmtip xystroke}def
/halfTip{360 32 div neg rotate halftip}bind def
/halfTtip{.31 mul 1 atan rotate halftip}bind def
/aTip{gchksavexy halfTip xystroke}def
/bTip{gchksavexy xyopp halfTip xystroke}def
/Tip{gchksavexy gsave halfTip stroke grestore
xyopp halfTip xystroke}def
/Ttip{gchksavexy xysegl neg 0 rlineto 0 0 moveto
gsave -1 halfTtip stroke grestore
xyopp -1 halfTtip xystroke}def
/halfturn{xysegl 2 div dup dup neg exch rmoveto
0 exch dup exch -180 -90 arc}bind def
/aturn{gchksavexy halfturn xystroke}def
/bturn{gchksavexy xyopp halfturn xystroke}def
/xysqll 231705 dimendiv def
/squigl{gchksavexy xysqll dup neg 0 rmoveto
2 div dup dup neg dup 3 -1 roll
2 sqrt mul dup 5 1 roll
135 45 arcn dup 3 -1 roll -135 -45 arc
xystroke}def
/fullhook{0 xysegl 2 div dup -90 90 arcn}bind def
/ahook{gchksavexy fullhook xystroke}def
/bhook{gchksavexy xyopp fullhook xystroke}def
/halfhook{xysegl 2 div dup 0 exch 180 90 arcn}bind def
/hook{gchksavexy gsave halfhook stroke grestore
xyopp halfhook xystroke}def
/xyqcirc{dup dup neg exch translate newpath
dup neg 0 exch moveto 0 0 3 -1 roll -90 0 arc}bind def
/circ{gstartxy
3 copy pop 2 copy cos mul 3 1 roll sin mul
rmoveto 0 0 5 2 roll arc xystroke}bind def
/circhar{gsave dup 3 gt{7 sub neg}if dup
3 eq{pop dup 2 sqrt -2 div mul}{dup 1 eq{pop dup 2 sqrt 2 div mul}
{0 eq{dup}{0}ifelse}ifelse}ifelse
0 translate 3 1 roll circ grestore}bind def
userdict begin
/gray{setgray}bind def /gray@{setgray}bind def
/rgb{setrgbcolor}bind def /rgb@{setrgbcolor}bind def
/hsb{sethsbcolor}bind def /hsb@{sethsbcolor}bind def
/setcmykcolor where{pop}{/setcmykcolor{dup 3 1 roll dup 5 1 roll
exch sub 1 add 5 1 roll exch sub 1 add 4 1 roll
exch sub 1 add 3 1 roll setrgbcolor}bind def}ifelse
/cmyk{setcmykcolor}bind def /cmyk@{setcmykcolor}bind def
/sethalftone where{/sethalftone load /tone exch def}if
end
end
%%EndResource